<template>
<div class="videobox" v-if="dialogVisible">
      <div class="top" @click="close"><i class="el-icon-close"></i></div>
    <video :src="src" id="mse" muted autoplay playsinline controls="controls">你的浏览器不支持Video标签</video>
    </div>
</template>

<script>
export default {
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
    src: {
      type: String
    }
  },
  data () {
    return {}
  },
  created () {
    // this.video.url = this.src
  },
  methods: {
    closedialog () {
      this.$emit('update:dialogVisible', false)
    },
    close () {
      this.closedialog()
    }
  }
}
</script>

<style scoped lang='less'>
.videobox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  z-index: 9999;
  width: 600px;
  .top {
    text-align: center;
    margin-bottom: 30px;
    font-size: 30px;
    color: #fff;
    i {
    background-color: rgba(0, 0, 0, .5);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, .5);
    border-radius: 50%;
    padding: 10px;
    }
  }
::v-deep video {
  max-width: 100%;
}
}
</style>
